package emulator.shell.GUI.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import emulator.GUI.FrameRegistry;
import emulator.shell.GUI.WindowData;

public class FileExit implements ActionListener
{
	private WindowData windowData;

	public FileExit(WindowData window_data)
	{
		windowData = window_data;
	}

	@Override
	public void actionPerformed(ActionEvent e)
	{
		FrameRegistry.getInstance().saveFrameStates();
		windowData.saveWindowStates();
		System.exit(0);
	}

}
